package com.ccp.dev.workflow.model.bpm;

import com.ccp.dev.core.basic.model.BaseModel;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

import java.util.Date;

/**
 * 任务执行人
 * @author wangtao
 * @date 2019-07-23
 */
public class TaskRead extends BaseModel
{
	// 主键
	protected String  id;
	// 流程实例ID
	protected String  procInstId;
	// 任务ID
	protected String  taskId;
	// 用户ID
	protected String  userId;
	// 用户名
	protected String  userName;
	// 创建时间
	protected Date createTime;
	public void setId(String id)
	{
		this.id = id;
	}

	public String getId() {
		return id;
	}

	public String getProcInstId() {
		return procInstId;
	}

	public void setProcInstId(String procInstId) {
		this.procInstId = procInstId;
	}

	public String getTaskId() {
		return taskId;
	}

	public void setTaskId(String taskId) {
		this.taskId = taskId;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	@Override
	public Date getCreateTime() {
		return createTime;
	}

	@Override
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	/**
	 * @see Object#equals(Object)
	 */
	@Override
	public boolean equals(Object object)
	{
		if (!(object instanceof TaskRead))
		{
			return false;
		}
		TaskRead rhs = (TaskRead) object;
		return new EqualsBuilder()
		.append(this.id, rhs.id)
		.append(this.procInstId, rhs.procInstId)
		.append(this.taskId, rhs.taskId)
		.append(this.userId, rhs.userId)
		.append(this.userName, rhs.userName)
		.append(this.createTime, rhs.createTime)
		.isEquals();
	}

	/**
	 * @see Object#hashCode()
	 */
	@Override
	public int hashCode()
	{
		return new HashCodeBuilder(-82280557, -700257973)
		.append(this.id)
		.append(this.procInstId)
		.append(this.taskId)
		.append(this.userId)
		.append(this.userName)
		.append(this.createTime)
		.toHashCode();
	}

	/**
	 * @see Object#toString()
	 */
	@Override
	public String toString()
	{
		return new ToStringBuilder(this)
		.append("id", this.id) 
		.append("procInstId", this.procInstId)
		.append("taskId", this.taskId)
		.append("userId", this.userId)
		.append("userName", this.userName)
		.append("createTime", this.createTime)
		.toString();
	}
   
  

}